package com.edu.feign;


import com.edu.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.edu.entity.CommonResult;

//指定调用的服务名，在yml文件中:spring.application.name: user-provider-server
@FeignClient("user-provider-server")
public interface UserServiceProviderService {
    //配置需要调用的挂号服务接口。与UserController中的方法定义一致
    @GetMapping("/user/getUserById/{userId}")
    CommonResult<User> getUserById(@PathVariable("userId") Integer userId);
    @GetMapping("/user/getUserByName/{userName}")
    CommonResult<User> getUserByName(@PathVariable("userName") String userName);
}



